import org.junit.*;

import static org.junit.Assert.*;

import java.util.*;

public class testDefenses {
	String s = "P 11.8 11.2 0 37 3" + "\n" +
	"P 9.3  21.8 1 100 5" + "\n" +
	"P 14.2 0.60 2 100 5" + "\n" +
	"P 11.8 5.20 0 81 3" + "\n" +
	"P 11.7 17.1 0 81 3" + "\n" +
	"P 4.2  0.00 0 22 1" + "\n" +
	"P 19.3 22.4 0 22 1" + "\n" +
	"P 14.7 22.3 0 83 3" + "\n" +
	"P 8.8  0.10 0 83 3" + "\n" +
	"P 19.8 0.70 0 84 1" + "\n" +
	"P 3.7  21.7 0 84 1" + "\n" +
	"P 8.8  9.70 0 12 5" + "\n" +
	"P 14.7 12.6 0 12 5" + "\n" +
	"P 0.0  10.8 0 59 2" + "\n" +
	"P 23.6 11.6 0 59 2" + "\n" +
	"P 20.3 15.5 0 59 3" + "\n" +
	"P 3.2  6.90 0 59 3" + "\n" +
	"P 17.0 6.60 0 4 2" + "\n" +
	"P 6.5  15.7 0 4 2" + "\n" +
	"P 0.7  19.6 0 55 1" + "\n" +
	"P 22.8 2.80 0 55 1" + "\n" +
	"P 2.6  13.1 0 58 3" + "\n" +
	"P 21.0 9.20 0 58 3"+ "\n" +
	"go"+"\n";
	
	// Planet(int planetID,	int owner,	int numShips,int growthRate,	double x,	double y)	
	
	public Planet p1 = new Planet(1,1,10,5,1,1);
	public Planet p2 = new Planet(2,1,15,5,3,3);
	public Planet p3 = new Planet(3,1,20,5,5,5);
	public Planet p4 = new Planet(4,1,25,5,10,10);
	
	public RainmanPlanet rp1 = new RainmanPlanet(p1);
	public RainmanPlanet rp2 = new RainmanPlanet(p2);
	public RainmanPlanet rp3 = new RainmanPlanet(p3);
	public RainmanPlanet rp4 = new RainmanPlanet(p4);
	
	public List<RainmanPlanet> pList = new ArrayList<RainmanPlanet>();

	// Initializes a fleet.
	//public Fleet(int owner, int numShips, int sourcePlanet, int destinationPlanet, 	int totalTripLength, int turnsRemaining) {
	public Fleet f1 = new Fleet(2,50,1,1,4,3);
	
	public List<Fleet> fList = new ArrayList<Fleet>();	
	
	@Before
	public void setUp(){
		pList.add(rp3);
		pList.add(rp4);
		pList.add(rp2);
		pList.add(rp1);	
		
		fList.add(f1);
	}
	
	@Test 
	public void callForHelp(){
		PlanetWars pw = new PlanetWars(s);
		
		rp1.predictFuture(fList);
		rp2.predictFuture(fList);
		rp3.predictFuture(fList);
		rp4.predictFuture(fList);
		
		
		Util.callForHelp(pw, rp1, pList);
		
		
	}
	
}
